import request from "@/utlis/request";

export default {
  // 通过id查询课程信息
  getCourseInfoById(id) {
    return request({
      url: `/edu_service/course_front/getCourseFrontById/${id}`,
      method: 'get'
    })
  },
  // 查询全部课程信息
  getCourseFrontList(current, limit, courseFrontVO) {
    return request({
      url: `/edu_service/course_front/getCourseFrontList/${current}/${limit}`,
      method: 'post',
      data: courseFrontVO
    })
  },
  // 查询课程分类
  getAllSubject() {
    return request({
      url: `/edu_service/subject/getAllSubject`,
      method: 'get'
    })
  },
  getBuyInfo(userId, courseId) {
    return request({
      url: `/service_order/order/getCourseIsBuyByOrder/${userId}/${courseId}`,
      method: 'get',
    })
  },
}
